﻿using AutoMapper;
using Nop.Core.Infrastructure.Mapper;
using Nop.Plugin.Resources.Client.AutoMapper;
using Nop.Plugin.Resources.Client.Domain;
using Nop.Plugin.Resources.Client.MappingExtensions;
using Nop.Plugin.Resources.Client.Models;
using System;
using System.Collections.Generic;
using System.Text;

namespace Nop.Plugin.Resources.Client
{
    public class ResMapperConfiguration : Profile, IOrderedMapperProfile
    {
        public ResMapperConfiguration()
        {
            CreateMap<ResSettings, ConfigurationModel>();
            CreateMap<ConfigurationModel, ResSettings>();

         
        }

        public int Order => 0;

        private new static void CreateMap<TSource, TDestination>()
        {
            AutoMapperResConfiguration.MapperConfigurationExpression.CreateMap<TSource, TDestination>()
                .IgnoreAllNonExisting();
        }
    }
}
